//
//  OrderListCell.m
//  gungunchou
//
//  Created by lyzbmacos3 on 2018/12/7.
//  Copyright © 2018年 xskj. All rights reserved.
//

#import "OrderListCell.h"

@implementation OrderListCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

- (void)setModel:(OrderInfoModel *)model
{
    if (model) {
        _model = model;
        self.statusLbl.text = model.iOrderStatus;
        self.timeLbl.text = model.CreateTime;
        self.totalScoreLbl.text = model.TotalAmount;
        
        if (model.LOrderInfo && model.LOrderInfo.count>0) {
            OrderSubInfoModel *theModel = model.LOrderInfo.firstObject;
            self.nameLbl.text = theModel.ProductName;
            self.scoreLbl.text = theModel.Price;
            self.numsLbl.text = theModel.Qty;
            [self.imgV sd_setImageWithURL:[NSURL URLWithString:theModel.ProductImage] placeholderImage:PLACE_DEFAULT_IMG];
        }
        
        
    }
}
@end
